home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Herois / Codigo.Cst / 00123_Verbetes- Licenciadores.ls < prev    next >
Encoding:
Text File  |  1999-03-19  |  1.6 KB  |  62 lines

  1. property spr, txt
  2. property ativo
  3.  
  4. on beginSprite me
  5.   set spr = the spriteNum of me
  6.   set txt = 87 
  7.   -- set the visibility of sprite spr to false
  8.   set ativo = false
  9.   set the locH of sprite spr to 94
  10.   set the locH of sprite txt to -219
  11. end
  12.  
  13. on cleanSprite me
  14.   set the visibility of sprite spr to true
  15.   global gPronde
  16.   if gPronde <> 10000 then
  17.     set the visibility of sprite 92 to true
  18.   end if
  19. end
  20.  
  21. on mouseUp me
  22.   set ativo = not ativo
  23.   if ativo then
  24.     -- Ativa licenciadores
  25.     set inicio = the timer
  26.     set tempo = 20
  27.     set the visibility of sprite 92 to false
  28.     -- set the visibility of sprite spr to true
  29.     updateStage
  30.     set tmp = the timer
  31.     repeat while tmp - inicio <= tempo 
  32.       set the locH of sprite spr to ┬¼
  33.             (335 - 94) * (tmp - inicio) / tempo + 94
  34.       set the locH of sprite txt to┬¼
  35.             (335 - 93) * (tmp - inicio) / tempo - 227
  36.       updateStage
  37.       set tmp = the timer
  38.     end repeat
  39.     set the locH of sprite spr to 335
  40.     set the locH of sprite txt to 15
  41.     updateStage
  42.   else
  43.     -- Desativo licenciadores
  44.     set inicio = the timer
  45.     set tempo = 20
  46.     set tmp = the timer
  47.     repeat while tmp - inicio <= tempo 
  48.       set the locH of sprite spr to ┬¼
  49.             (94 - 335) * (tmp - inicio) / tempo + 335
  50.       set the locH of sprite txt to┬¼
  51.             (93 - 335) * (tmp - inicio) / tempo + 15
  52.       updateStage
  53.       set tmp = the timer
  54.     end repeat
  55.     set the locH of sprite spr to 94
  56.     set the locH of sprite txt to -227
  57.     -- set the visibility of sprite spr to false
  58.     set the visibility of sprite 92 to true
  59.     updateStage
  60.   end if
  61. end
  62.